<?php

class error_controller {
    private $error_message;
    private $fatal;    // Boolean
    public function exec_error(){
        $tpl = new Template(MODULE_ROOT."/error/view/error.html");
        $tpl->set('message',$this->error_message);
        $view_data['content'] = $tpl->fetch();
        return $view_data;
    }
    
    function set_error($message){
        $this->error_message.=$message."<br/>";
    }
    function fatality(){
        $this->fatal = true;
    }
    
    function is_fatality(){
        return $this->fatal;
    }
}